home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1986 April / Ahoy_Magazine_86-04_1986_Double_L.d64 / pyramidal print (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  376b  |  13 lines

  1. 1 rem
  2. 2 rem problem #24-2 :
  3. 3 rem  pyramidal printout
  4. 4 rem solution by
  5. 5 rem  ron weiner
  6. 6 rem
  7. 10 open 4,3:input"output to screen or printer (s/p)   s[157][157][157]";a$:if a$="s"goto 30
  8. 20 close 4 : open 4,4
  9. 30 input "enter any word which has same first and last letters";w$
  10. 40 print#4,spc(len(w$)-1)left$(w$,1)
  11. 50 fori=2 to len(w$)-1:print#4,spc(len(w$)-i)mid$(w$,i,1)spc(i*2-3)mid$(w$,i,1)
  12. 60 next:for i=1 to len(w$):print#4,mid$(w$,i,1)" ";:next:print#4:close4
  13.